package com.qf.spring2202.annotation.service.impl;

import com.qf.spring2202.annotation.dao.UserDao;
import com.qf.spring2202.annotation.einty.User;
import com.qf.spring2202.annotation.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
//    @Qualifier("userDaoImplBetter")
    private UserDao userDaoImplBetter;

//    public UserDao getUserDaoImplBetter() {
//        return userDaoImplBetter;
//    }
//
//    public void setUserDaoImplBetter(UserDao userDaoImplBetter) {
//        this.userDaoImplBetter = userDaoImplBetter;
//    }

    @Override
    public User getUser(Integer id) {
        return userDaoImplBetter.getUserById(id);
    }
}
